from django.shortcuts import render
from django.http import HttpResponse
from . import service
# Create your views here.

def index(request):
    ts = service.getAllTitles()
    return render(request, "poem/list.html",{"titles":ts})

def detail(request, name):
    poem = service.getPoemByTitle(name)
    return render(request, 'poem/shige.html', {"shi":poem})
